<template>
  <div class="afterSaleAdd">
    <TableList
      :linklist="linklist"
      @JumpEditPage="getData"
    />

    <Paging
      ref="pages"
      :total="tableData.length"
      @getPage="getPage"
      @getLimit="getLimit"
    />
  </div>
</template>

<script>
import TableList from "../../components/AddOrderList.vue";
import Paging from "../../components/Paging.vue";
export default {
  name: "AfterSaleAdd",
  data() {
    return {
      // 表格属性值
      tableData: [
        {
          name: "fnds",
          clienttype: "已成交",
          connectperson: "222",
          phonenumber: "178098928",
          myQQ:"",
          email: "@gduh",
          entertime: "2021/12/2",
          manageperson: "超级管理员",
        },
        {
          name: "fnd",
          clienttype: "等待打款",
          connectperson: "222",
          phonenumber: "178098928",
          myQQ:"1235564",
          email: "@gduh",
          entertime: "2021/12/2",
          manageperson: "超级管理员",
        },
      ],
      // 表头名称
      linklist: [
        {
          id: 0,
          name: "客户名称",
          isRouter: true,
          url: "/afterSale/addAfterSale",
        },
        {
          id: 1,
          name: "客户类型",
        },
        {
          id: 2,
          name: "联系人",
        },
        {
          id: 3,
          name: "手机号码",
        },
        {
          id: 4,
          name: "QQ",
        },
        {
          id: 5,
          name: "电子邮箱",
        },
        {
          id: 6,
          name: "录入时间",
        },
        {
          id: 7,
          name: "业务员",
        }
      ],
      // 表格 数据属性名
      titleList: [
        "name",
        "clienttype",
        "connectperson",
        "phonenumber",
        "myQQ",
        "email",
        "entertime",
        "manageperson",
      ],
    };
  },
  components: {
    TableList,
    Paging,
  },
  methods: {
    getData(row) {
      console.log(row);
      this.$router.push({
        path: "/afterSale/addAfterSale",
        query: { editInfo: row },
        data:{

        }
      });
    },
    getLimit() {
      this.limit = this.$refs.pages.limit;
      console.log(this.limit);
    },
    getPage() {
      this.page = this.$refs.pages.page;
      console.log(this.page);
    },
  },
  created() {},
  mounted() {
    this.getPage();
    this.getLimit();
  },
};
</script>

<style>
</style>